winsafe\ole\co/
consts.rs

1#![allow(non_camel_case_types)]
2
3const_bitflag! { ADVF: u32;
4	/// [`ADVF`](https://learn.microsoft.com/en-us/windows/win32/api/objidl/ne-objidl-advf)
5	/// enumeration (`u32`).
6	=>
7	NODATA 1
8	PRIMEFIRST 2
9	ONLYONCE 4
10	DATAONSTOP 64
11}
12
13const_bitflag! { BIND: u32;
14	/// [`BIND_FLAGS`](https://learn.microsoft.com/en-us/windows/win32/api/objidl/ne-objidl-bind_flags)
15	/// enumeration (`u32`).
16	=>
17	MAYBOTHERUSER 1
18	JUSTTESTEXISTENCE 2
19}
20
21const_ordinary! { CLSCTX: u32;
22	/// [`CLSCTX`](https://learn.microsoft.com/en-us/windows/win32/api/wtypesbase/ne-wtypesbase-clsctx)
23	/// enumeration (`u32`).
24	=>
25	/// Same process.
26	///
27	/// The code that creates and manages objects of this class is a DLL that
28	/// runs in the same process as the caller of the function specifying the
29	/// class context.
30	INPROC_SERVER 0x1
31	/// The code that manages objects of this class is an in-process handler.
32	/// This is a DLL that runs in the client process and implements client-side
33	/// structures of this class when instances of the class are accessed
34	/// remotely.
35	INPROC_HANDLER 0x2
36	/// Different process, same computer.
37	///
38	/// The EXE code that creates and manages objects of this class runs on same
39	/// machine but is loaded in a separate process space.
40	LOCAL_SERVER 0x4
41	/// Different computer.
42	///
43	/// A remote context. The `LocalServer32` or `LocalService` code that creates
44	/// and manages objects of this class is run on a different computer.
45	REMOTE_SERVER 0x10
46	/// Disables the downloading of code from the directory service or the
47	/// Internet. This flag cannot be set at the same time as
48	/// `CLSCTX::ENABLE_CODE_DOWNLOAD`.
49	NO_CODE_DOWNLOAD 0x400
50	/// Specify if you want the activation to fail if it uses custom marshalling.
51	NO_CUSTOM_MARSHAL 0x1000
52	/// Enables the downloading of code from the directory service or the
53	/// Internet. This flag cannot be set at the same time as
54	/// `CLSCTX::NO_CODE_DOWNLOAD`.
55	ENABLE_CODE_DOWNLOAD 0x2000
56	/// The `CLSCTX::NO_FAILURE_LOG` can be used to override the logging of
57	/// failures in `CoCreateInstanceEx`.
58	NO_FAILURE_LOG 0x4000
59	/// Disables activate-as-activator (AAA) activations for this activation only.
60	DISABLE_AAA 0x8000
61	/// Enables activate-as-activator (AAA) activations for this activation only.
62	ENABLE_AAA 0x1_0000
63	/// Begin this activation from the default context of the current apartment.
64	FROM_DEFAULT_CONTEXT 0x2_0000
65	/// Activate or connect to a 32-bit version of the server; fail if one is not
66	/// registered.
67	ACTIVATE_X86_SERVER 0x4_0000
68	/// Activate or connect to a 32-bit version of the server; fail if one is not
69	/// registered.
70	ACTIVATE_32_BIT_SERVER Self::ACTIVATE_X86_SERVER.0
71	/// Activate or connect to a 64 bit version of the server; fail if one is not
72	/// registered.
73	ACTIVATE_64_BIT_SERVER 0x8_0000
74	/// Specify this flag for Interactive User activation behavior for
75	/// As-Activator servers.
76	ACTIVATE_AAA_AS_IU 0x80_0000
77	/// (No official docs for this entry.)
78	ACTIVATE_ARM32_SERVER 0x200_0000
79
80	ALL Self::INPROC_SERVER.0 | Self::INPROC_HANDLER.0 | Self::LOCAL_SERVER.0 | Self::REMOTE_SERVER.0
81	SERVER Self::INPROC_SERVER.0 | Self::INPROC_HANDLER.0 | Self::LOCAL_SERVER.0
82}
83
84const_bitflag! { COINIT: u32;
85	/// [`COINIT`](https://learn.microsoft.com/en-us/windows/win32/api/objbase/ne-objbase-coinit)
86	/// enumeration (`u32`).
87	=>
88	/// Initializes the thread for apartment-threaded object concurrency.
89	///
90	/// Use this when in a thread that creates a window.
91	APARTMENTTHREADED 0x2
92	/// Initializes the thread for multithreaded object concurrency.
93	///
94	/// Use this when in a thread that doesn't create a window.
95	MULTITHREADED 0x0
96	/// Disables DDE for OLE1 support.
97	///
98	/// It's a good idea to add this flag, since it avoids some overhead
99	/// associated with OLE 1.0, an obsolete technology.
100	DISABLE_OLE1DDE 0x4
101	/// Increase memory usage in an attempt to increase performance.
102	SPEED_OVER_MEMORY 0x8
103}
104
105const_bitflag! { DROPEFFECT: u32;
106	/// [`DROPEFFECT`](https://learn.microsoft.com/en-us/windows/win32/com/dropeffect-constants)
107	/// constants (`u32`).
108	=>
109	NONE 0
110	COPY 1
111	MOVE 2
112	LINK 4
113	SCROLL 0x8000_0000
114}
115
116const_ordinary! { DVASPECT: u32;
117	/// [`DVASPECT`](https://learn.microsoft.com/en-us/windows/win32/api/wtypes/ne-wtypes-dvaspect)
118	/// enumeration (`u32`).
119	=>
120	CONTENT 1
121	THUMBNAIL 2
122	ICON 4
123	DOCPRINT 8
124}
125
126const_ordinary! { FACILITY: u32;
127	/// [`HRESULT`](crate::co::HRESULT) facility (`u32`).
128	=>
129	NULL 0
130	RPC 1
131	DISPATCH 2
132	STORAGE 3
133	ITF 4
134	WIN32 7
135	WINDOWS 8
136	SSPI 9
137	SECURITY 9
138	CONTROL 10
139	CERT 11
140	INTERNET 12
141	MEDIASERVER 13
142	MSMQ 14
143	SETUPAPI 15
144	SCARD 16
145	COMPLUS 17
146	AAF 18
147	URT 19
148	ACS 20
149	DPLAY 21
150	UMI 22
151	SXS 23
152	WINDOWS_CE 24
153	HTTP 25
154	USERMODE_COMMONLOG 26
155	WER 27
156	USERMODE_FILTER_MANAGER 31
157	BACKGROUNDCOPY 32
158	CONFIGURATION 33
159	WIA 33
160	STATE_MANAGEMENT 34
161	METADIRECTORY 35
162	WINDOWSUPDATE 36
163	DIRECTORYSERVICE 37
164	GRAPHICS 38
165	SHELL 39
166	NAP 39
167	TPM_SERVICES 40
168	TPM_SOFTWARE 41
169	UI 42
170	XAML 43
171	ACTION_QUEUE 44
172	PLA 48
173	WINDOWS_SETUP 48
174	FVE 49
175	FWP 50
176	WINRM 51
177	NDIS 52
178	USERMODE_HYPERVISOR 53
179	CMI 54
180	USERMODE_VIRTUALIZATION 55
181	USERMODE_VOLMGR 56
182	BCD 57
183	USERMODE_VHD 58
184	USERMODE_HNS 59
185	SDIAG 60
186	WEBSERVICES 61
187	WINPE 61
188	WPN 62
189	WINDOWS_STORE 63
190	INPUT 64
191	EAP 66
192	WINDOWS_DEFENDER 80
193	OPC 81
194	XPS 82
195	MBN 84
196	POWERSHELL 84
197	RAS 83
198	P2P_INT 98
199	P2P 99
200	DAF 100
201	BLUETOOTH_ATT 101
202	AUDIO 102
203	STATEREPOSITORY 103
204	VISUALCPP 109
205	SCRIPT 112
206	PARSE 113
207	BLB 120
208	BLB_CLI 121
209	WSBAPP 122
210	BLBUI 128
211	USN 129
212	USERMODE_VOLSNAP 130
213	TIERING 131
214	WSB_ONLINE 133
215	ONLINE_ID 134
216	DEVICE_UPDATE_AGENT 135
217	DRVSERVICING 136
218	DLS 153
219	DELIVERY_OPTIMIZATION 208
220	USERMODE_SPACES 231
221	USER_MODE_SECURITY_CORE 232
222	USERMODE_LICENSING 234
223	SOS 160
224	DEBUGGERS 176
225	SPP 256
226	RESTORE 256
227	DMSERVER 256
228	DEPLOYMENT_SERVICES_SERVER 257
229	DEPLOYMENT_SERVICES_IMAGING 258
230	DEPLOYMENT_SERVICES_MANAGEMENT 259
231	DEPLOYMENT_SERVICES_UTIL 260
232	DEPLOYMENT_SERVICES_BINLSVC 261
233	DEPLOYMENT_SERVICES_PXE 263
234	DEPLOYMENT_SERVICES_TFTP 264
235	DEPLOYMENT_SERVICES_TRANSPORT_MANAGEMENT 272
236	DEPLOYMENT_SERVICES_DRIVER_PROVISIONING 278
237	DEPLOYMENT_SERVICES_MULTICAST_SERVER 289
238	DEPLOYMENT_SERVICES_MULTICAST_CLIENT 290
239	DEPLOYMENT_SERVICES_CONTENT_PROVIDER 293
240	LINGUISTIC_SERVICES 305
241	AUDIOSTREAMING 1094
242	ACCELERATOR 1536
243	WMAAECMA 1996
244	DIRECTMUSIC 2168
245	DIRECT3D10 2169
246	DXGI 2170
247	DXGI_DDI 2171
248	DIRECT3D11 2172
249	DIRECT3D11_DEBUG 2173
250	DIRECT3D12 2174
251	DIRECT3D12_DEBUG 2175
252	LEAP 2184
253	AUDCLNT 2185
254	WINCODEC_DWRITE_DWM 2200
255	WINML 2192
256	DIRECT2D 2201
257	DEFRAG 2304
258	USERMODE_SDBUS 2305
259	JSCRIPT 2306
260	PIDGENX 2561
261	EAS 85
262	WEB 885
263	WEB_SOCKET 886
264	MOBILE 1793
265	SQLITE 1967
266	UTC 1989
267	WEP 2049
268	SYNCENGINE 2050
269	XBOX 2339
270	GAME 2340
271	PIX 2748
272}
273
274const_bitflag! { LOCKTYPE: u32;
275	/// [`LOCKTYPE`](https://learn.microsoft.com/en-us/windows/win32/api/objidl/ne-objidl-locktype)
276	/// enumeration (`u32`).
277	=>
278	WRITE 1
279	EXCLUSIVE 2
280	ONLYONCE 4
281}
282
283const_ordinary! { MKRREDUCE: u32;
284	/// [How far](https://learn.microsoft.com/en-us/windows/win32/api/objidl/ne-objidl-mkrreduce)
285	/// a moniker should be reduced (`u32`).
286	=>
287	ONE (3 << 16)
288	TOUSER (2 << 16)
289	THROUGHUSER (1 << 16)
290	ALL 0
291}
292
293const_ordinary! { MKSYS: u32;
294	/// Moniker
295	/// [classes](https://learn.microsoft.com/en-us/windows/win32/api/objidl/ne-objidl-mksys)
296	/// (`u32`).
297	=>
298	NONE 0
299	GENERICCOMPOSITE 1
300	FILEMONIKER 2
301	ANTIMONIKER 3
302	ITEMMONIKER 4
303	POINTERMONIKER 5
304	CLASSMONIKER 7
305	OBJREFMONIKER 8
306	SESSIONMONIKER 9
307	LUAMONIKER 10
308}
309
310const_bitflag! { PICTURE: u32;
311	/// [`PICTUREATTRIBUTES`](https://learn.microsoft.com/en-us/windows/win32/api/ocidl/ne-ocidl-pictureattributes)
312	/// enumeration (`u32`).
313	=>
314	SCALABLE 0x1
315	TRANSPARENT 0x2
316}
317
318const_ordinary! { PICTYPE: i16;
319	/// [`PICTYPE`](https://learn.microsoft.com/en-us/windows/win32/com/pictype-constants)
320	/// constants (`i16`).
321	=>
322	UNINITIALIZED -1
323	NONE 0
324	BITMAP 1
325	METAFILE 2
326	ICON 3
327	ENHMETAFILE 4
328}
329
330const_ordinary! { RPC_C_AUTHN: u32;
331	/// Authentication service
332	/// [constants](https://learn.microsoft.com/en-us/windows/win32/com/com-authentication-service-constants)
333	/// (`u32`).
334	=>
335	NONE 0
336	DCE_PRIVATE 1
337	DCE_PUBLIC 2
338	DEC_PUBLIC 4
339	GSS_NEGOTIATE 9
340	WINNT 10
341	GSS_SCHANNEL 14
342	GSS_KERBEROS 16
343	DPA 17
344	MSN 18
345	DIGEST 21
346	KERNEL 20
347	NEGO_EXTENDER 30
348	PKU2U 31
349	LIVE_SSP 32
350	LIVEXP_SSP 35
351	CLOUD_AP 36
352	MSONLINE 82
353	MQ 100
354	DEFAULT 0xffff_ffff
355}
356
357const_ordinary! { RPC_C_AUTHN_LEVEL: u32;
358	/// Authentication level
359	/// [constants](https://learn.microsoft.com/en-us/windows/win32/com/com-authentication-level-constants)
360	/// (`u32`).
361	=>
362	DEFAULT 0
363	NONE 1
364	CONNECT 2
365	CALL 3
366	PKT 4
367	PKT_INTEGRITY 5
368	PKT_PRIVACY 6
369}
370
371const_ordinary! { RPC_C_AUTHZ: u32;
372	/// Authorization
373	/// [constants](https://learn.microsoft.com/en-us/windows/win32/com/com-authorization-constants)
374	/// (`u32`).
375	=>
376	NONE 0
377	NAME 1
378	DCE 2
379	DEFAULT 0xffff_ffff
380}
381
382const_ordinary! { RPC_C_IMP_LEVEL: u32;
383	/// Impersonation level
384	/// [constants](https://learn.microsoft.com/en-us/windows/win32/com/com-impersonation-level-constants)
385	/// (`u32`).
386	=>
387	DEFAULT 0
388	ANONYMOUS 1
389	IDENTIFY 2
390	IMPERSONATE 3
391	DELEGATE 4
392}
393
394const_ordinary! { RPC_C_QOS_CAPABILITIES: u32;
395	/// [Quality of service](https://learn.microsoft.com/en-us/windows/win32/rpc/quality-of-service)
396	/// capabilities (`u32`).
397	=>
398	DEFAULT 0x0
399	MUTUAL_AUTH 0x1
400	MAKE_FULLSIC 0x2
401	ANY_AUTHORITY 0x4
402	IGNORE_DELEGATE_FAILURE 0x8
403	LOCAL_MA_HINT 0x10
404	SCHANNEL_FULL_AUTH_IDENTITY 0x20
405}
406
407const_ordinary! { SEC_WINNT_AUTH_IDENTITY: u32;
408	/// [`COAUTHIDENTITY`](crate::COAUTHIDENTITY) `Flags` (`u32`).
409	=>
410	ANSI 0x1
411	UNICODE 0x2
412}
413
414const_ordinary! { SEVERITY: u8;
415	/// [`HRESULT`](crate::co::HRESULT) severity (`u8`).
416	=>
417	SUCCESS 0
418	FAILURE 1
419}
420
421const_bitflag! { SLR: u32;
422	/// [`BIND_OPTS3`](crate::BIND_OPTS3) and
423	/// [`IShellLink::Resolve`](crate::prelude::shell_IShellLink::GetPath)
424	/// `flags` (`u32`).
425	=>
426	NONE 0
427	NO_UI 0x1
428	ANY_MATCH 0x2
429	UPDATE 0x4
430	NOUPDATE 0x8
431	NOSEARCH 0x10
432	NOTRACK 0x20
433	NOLINKINFO 0x40
434	INVOKE_MSI 0x80
435	NO_UI_WITH_MSG_PUMP 0x101
436	OFFER_DELETE_WITHOUT_FILE 0x200
437	KNOWNFOLDER 0x400
438	MACHINE_IN_LOCAL_TARGET 0x800
439	UPDATE_MACHINE_AND_SID 0x1000
440	NO_OBJECT_ID 0x2000
441}
442
443const_bitflag! { STGC: u32;
444	/// [`STGC`](https://learn.microsoft.com/en-us/windows/win32/api/wtypes/ne-wtypes-stgc)
445	/// enumeration (`u32`).
446	=>
447	DEFAULT 0
448	OVERWRITE 1
449	ONLYIFCURRENT 2
450	DANGEROUSLYCOMMITMERELYTODISKCACHE 4
451	CONSOLIDATE 8
452}
453
454const_bitflag! { STGM: u32;
455	/// [`STGM`](https://learn.microsoft.com/en-us/windows/win32/stg/stgm-constants)
456	/// enumeration (`u32`).
457	=>
458	READ 0x0000_0000
459	WRITE 0x0000_0001
460	READWRITE 0x0000_0002
461	SHARE_DENY_NONE 0x0000_0040
462	SHARE_DENY_READ 0x0000_0030
463	SHARE_DENY_WRITE 0x0000_0020
464	SHARE_EXCLUSIVE 0x0000_0010
465	PRIORITY 0x0004_0000
466	CREATE 0x0000_1000
467	CONVERT 0x0002_0000
468	FAILIFTHERE 0x0000_0000
469	DIRECT 0x0000_0000
470	TRANSACTED 0x0001_0000
471	NOSCRATCH 0x0010_0000
472	NOSNAPSHOT 0x0020_0000
473	SIMPLE 0x0800_0000
474	DIRECT_SWMR 0x0040_0000
475	DELETEONRELEASE 0x0400_0000
476}
477
478const_ordinary! { STGMOVE: u32;
479	/// [`STGMOVE`](https://learn.microsoft.com/en-us/windows/win32/api/wtypes/ne-wtypes-stgmove)
480	/// enumeration (`u32`).
481	=>
482	MOVE 0
483	COPY 1
484	SHALLOWCOPY 2
485}
486
487const_ordinary! { STREAM_SEEK: u32;
488	/// [`STREAM_SEEK`](https://learn.microsoft.com/en-us/windows/win32/api/objidl/ne-objidl-stream_seek)
489	/// enumeration (`u32`).
490	=>
491	SET 0
492	CUR 1
493	END 2
494}
495
496const_ordinary! { TYMED: u32;
497	/// [`TYMED`](https://learn.microsoft.com/en-us/windows/win32/api/objidl/ne-objidl-tymed)
498	/// enumeration (`u32`).
499	=>
500	HGLOBAL 1
501	FILE 2
502	ISTREAM 4
503	ISTORAGE 8
504	GDI 16
505	MFPICT 32
506	ENHMF 64
507	NULL 0
508}